//JSON.__noSuchMethod__ = function(methodName){
//    logger.info("no such method and add method form _G")
//    JSON = _G.JSON
//}
//String.__noSuchMethod__ = function(methodName){
//    logger.info("no such method and add method form _G")
//    JSON = _G.String
//}
//

function syncImports() {


    for (var key in _G) {
        if (key != 'nashorn.global') {

            //logger.info("任务【 {} 】 同步属性 当前 key={}", context.get(LUA_TASK_KEY), key, this[key])
            //this[key].__noSuchProperty__ = function (name) {
            //    logger.info("任务【 {} 】 __noSuchProperty__ {}, this.{} = {}, _G.{} = {}", context.get(LUA_TASK_KEY), key, key, this[key], key, _G[key])
           //    this[key] = _G[name]
           //}
           //this[key].__noSuchMethod__ = function (name) {
           //    logger.info("任务【 {} 】 __noSuchProperty__ {}, this.{} = {}, _G.{} = {}", context.get(LUA_TASK_KEY), key, key, this[key], key, _G[key])
           //    this[key] = _G[name]
           //h }
            if (this[key] && this[key] !== _G[key]) {

                // print(key)
                logger.info("任务【 {} 】 同步属性 {}, this.{} = {}, _G.{} = {}", context.get(LUA_TASK_KEY), key, key, this[key], key, _G[key])
                var classObject = _G[key]
                eval(key + "= classObject")
            }
        }

    }
}